from excelRead import getExcel
from httpUtils import send_requests
import pytest
import json

class TestCase():
    @pytest.mark.parametrize('case', getExcel())
    def test_object(self, case):
        url = case[1]
        data = case[2]
        header = case[3]
        msg = case[4]
        method = case[5]
        status = case[6]
        res = send_requests(method, url, header, data)
        res = json.loads(res.text)
        # print(res)
        assert res['status'] == status
        assert res['message'] == msg
        # print(res)


if __name__ == '__main__':
    pytest.main(['-v','-s','testcase.py'])